package com.ds.infra.rpc.registry.service;

import com.ds.infra.rpc.registry.model.ServiceInstance;

import java.util.List;
import java.util.Map;

/**
 * 作用：RPC服务发现核心接口
 *
 * @author WeiShaoying
 */
public interface ServiceDiscovery {

    List<Map<String, Object>> discover(String serviceKey) throws Exception;

    List<ServiceInstance> discoverInstance(String serviceKey) throws Exception;

    void watchService(String serviceKey, Runnable changeHandler) throws Exception;
}
